package com.holly.unit.bpmn.activiti.pojo;

import com.holly.unit.core.pojo.request.BaseRequest;
import com.holly.unit.scanner.api.annotation.field.ChineseDescription;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 类描述: 配置EL表达式
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/4/21 17:08
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ProcessDefSetElRequest extends BaseRequest {

    @ChineseDescription("流程定义id")
    private String processDefId;

    @NotNull(message = "流程模型id不能为空", groups = {checkEl.class})
    @ChineseDescription("流程模型id")
    private String modelId;

    @NotNull(message = "节点对象id不能为空", groups = {checkEl.class})
    @ChineseDescription("节点对象id")
    private String nodeId;

   /* @NotNull(message = "EL表达式不能为空", groups = {checkEl.class})
    @ChineseDescription("EL表达式 如：${days>3}")
    private String condition;*/

    @NotNull(message = "EL表达式不能为空", groups = {checkEl.class})
    @ChineseDescription("EL表达式 如：${days>3}")
    private List<ActiviExpressionRequest> requests;

    /**
     * 参数校验分组：禁用 or 启用
     */
    public @interface checkEl {
    }

}
